<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>
          Google Web Toolkit
          
            -
            FocusWidget</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link href="../css/base.css" rel="stylesheet" type="text/css">
<link href="./doc.css" rel="stylesheet" type="text/css">
<link href="../css/print.css" rel="stylesheet" media="print" type="text/css">
</head>
<body>
<div id="gaia">&nbsp;</div>
<div id="header">
<div id="logo">
<a href="http://code.google.com/"><img src="http://code.google.com/images/code_sm.png" alt="Google"></a>
</div>
<div id="title">Google Web Toolkit (Beta)</div>
<div id="breadcrumbs">
<div id="nextprev">
<nobr><a href="com.google.gwt.user.client.ui.FocusPanel.html">&laquo; prev</a></nobr><nobr><a href="com.google.gwt.user.client.ui.FormHandlerCollection.html">next &raquo;</a></nobr>
</div>
<span class="item"><a href="http://code.google.com/">Google Code Home</a></span>
        &gt;
        <span class="item"><a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a></span>
        &gt;
        
        <span class="item"><a xmlns="" href="gwt.html">GWT Class Reference</a></span> &gt;
            <span class="item"><a href="com.google.gwt.user.client.ui.html">com.google.gwt.user.client.ui</a></span> &gt;
            <span class="selected item">FocusWidget</span>
</div>
</div>
<div id="side">
<div id="menu">
<h4>
<a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a>
</h4>
<ul>
<li>
<a href="http://code.google.com/webtoolkit/download.html">Download GWT</a>
</li>
</ul>
<ul>
<li>
<a href="http://code.google.com/webtoolkit/overview.html">Product Overview</a>
</li>
<li>
<a href="http://code.google.com/webtoolkit/gettingstarted.html">Getting Started Guide</a>
</li>
<li>
<a href="http://code.google.com/webtoolkit/documentation/examples/">Example Projects</a>
</li>
</ul>
<ul>
<li>
<a href="./com.google.gwt.doc.DeveloperGuide.html">Developer Guide</a>
</li>
<li>
<a class="selected" href="./gwt.html">Class Reference</a>
</li>
<li>
<a href="http://code.google.com/webtoolkit/issues/">Issue Tracking</a>
</li>
<li>
<a href="http://groups.google.com/group/Google-Web-Toolkit">Developer Forum</a>
</li>
</ul>
<ul>
<li>
<a href="http://googlewebtoolkit.blogspot.com/">GWT Blog</a>
</li>
<li>
<a href="http://code.google.com/webtoolkit/faq.html">GWT FAQ</a>
</li>
<li>
<a href="http://code.google.com/webtoolkit/makinggwtbetter.html">Making GWT Better</a>
</li>
</ul>
<ul>
<li>
<a href="http://code.google.com/webtoolkit/thirdparty.html">Third Party Tools</a>
</li>
</ul>
</div>
<div id="search">
<form action="http://www.google.com/search" method="get">
<div>
<input name="domains" value="code.google.com" type="hidden"><input name="sitesearch" value="code.google.com" type="hidden">
<div class="header">Search this site:</div>
<div class="input">
<input name="q" size="10">
</div>
<div class="button">
<input value="Search" type="submit">
</div>
</div>
</form>
</div>
</div>
<div xmlns="http://www.w3.org/1999/xhtml" id="body">
<h1>Class FocusWidget</h1>
<div class="classSig">public 
            class 
            FocusWidget<br>extends
                <a xmlns="" href="com.google.gwt.user.client.ui.Widget.html">Widget</a>
<br>implements 
                <a href="com.google.gwt.user.client.ui.SourcesClickEvents.html">SourcesClickEvents</a>, <a href="com.google.gwt.user.client.ui.SourcesFocusEvents.html">SourcesFocusEvents</a>, <a href="com.google.gwt.user.client.ui.HasFocus.html">HasFocus</a>
<br>
<br>// Superclass of <code><a href="com.google.gwt.user.client.ui.ButtonBase.html">ButtonBase</a></code>, <code><a href="com.google.gwt.user.client.ui.ListBox.html">ListBox</a></code>, <code><a href="com.google.gwt.user.client.ui.TextBoxBase.html">TextBoxBase</a></code>
</div>Abstract base class for most widgets that can receive keyboard focus.<h2 class="api">Constructors</h2>
<table cellpadding="1" cellspacing="1" class="members">
<tr>
<td><a href="com.google.gwt.user.client.ui.FocusWidget.html#FocusWidget(com.google.gwt.user.client.Element)">FocusWidget(Element)</a></td><td>Creates a new focus component that wraps the specified browser element. </td>
</tr>
</table>
<h2 class="api">Methods</h2>
<table cellpadding="1" cellspacing="1" class="members">
<tr>
<td><a href="com.google.gwt.user.client.ui.FocusWidget.html#addClickListener(com.google.gwt.user.client.ui.ClickListener)">addClickListener(ClickListener)</a></td><td>Adds a listener interface to receive click events. </td>
</tr>
<tr>
<td><a href="com.google.gwt.user.client.ui.FocusWidget.html#addFocusListener(com.google.gwt.user.client.ui.FocusListener)">addFocusListener(FocusListener)</a></td><td>Adds a listener interface to receive mouse events. </td>
</tr>
<tr>
<td><a href="com.google.gwt.user.client.ui.FocusWidget.html#addKeyboardListener(com.google.gwt.user.client.ui.KeyboardListener)">addKeyboardListener(KeyboardListener)</a></td><td>Adds a listener interface to receive keyboard events. </td>
</tr>
<tr>
<td><a href="com.google.gwt.user.client.ui.FocusWidget.html#getFocusImpl()">getFocusImpl()</a></td><td>Gets the FocusImpl instance. </td>
</tr>
<tr>
<td><a href="com.google.gwt.user.client.ui.FocusWidget.html#getTabIndex()">getTabIndex()</a></td><td>Gets the widget's position in the tab index. </td>
</tr>
<tr>
<td><a href="com.google.gwt.user.client.ui.FocusWidget.html#isEnabled()">isEnabled()</a></td><td>Gets whether this widget is enabled. </td>
</tr>
<tr>
<td><a href="com.google.gwt.user.client.ui.FocusWidget.html#onBrowserEvent(com.google.gwt.user.client.Event)">onBrowserEvent(Event)</a></td><td></td>
</tr>
<tr>
<td><a href="com.google.gwt.user.client.ui.FocusWidget.html#removeClickListener(com.google.gwt.user.client.ui.ClickListener)">removeClickListener(ClickListener)</a></td><td>Removes a previously added listener interface. </td>
</tr>
<tr>
<td><a href="com.google.gwt.user.client.ui.FocusWidget.html#removeFocusListener(com.google.gwt.user.client.ui.FocusListener)">removeFocusListener(FocusListener)</a></td><td>Removes a previously added listener interface. </td>
</tr>
<tr>
<td><a href="com.google.gwt.user.client.ui.FocusWidget.html#removeKeyboardListener(com.google.gwt.user.client.ui.KeyboardListener)">removeKeyboardListener(KeyboardListener)</a></td><td>Removes a previously added listener interface. </td>
</tr>
<tr>
<td><a href="com.google.gwt.user.client.ui.FocusWidget.html#setAccessKey(char)">setAccessKey(char)</a></td><td>Sets the widget's 'access key'. </td>
</tr>
<tr>
<td><a href="com.google.gwt.user.client.ui.FocusWidget.html#setEnabled(boolean)">setEnabled(boolean)</a></td><td>Sets whether this widget is enabled. </td>
</tr>
<tr>
<td><a href="com.google.gwt.user.client.ui.FocusWidget.html#setFocus(boolean)">setFocus(boolean)</a></td><td>Explicitly focus/unfocus this widget. </td>
</tr>
<tr>
<td><a href="com.google.gwt.user.client.ui.FocusWidget.html#setTabIndex(int)">setTabIndex(int)</a></td><td>Sets the widget's position in the tab index. </td>
</tr>
</table>
<h2 class="api">Constructor Detail</h2>
<a name="FocusWidget(com.google.gwt.user.client.Element)"></a>
<h3 class="api">FocusWidget</h3>
<div class="memberSig">protected <b> FocusWidget</b>(<nobr><a href="com.google.gwt.user.client.Element.html">Element</a> elem</nobr>)</div>Creates a new focus component that wraps the specified browser element.<h4 class="api">Parameters</h4>
<dl class="memberDetail">
<dt>elem</dt>
<dd>the element to be wrapped</dd>
</dl>
<h2 class="api">Method Detail</h2>
<a name="addClickListener(com.google.gwt.user.client.ui.ClickListener)"></a>
<h3 class="api">addClickListener</h3>
<div class="memberSig">public void<b> addClickListener</b>(<nobr><a href="com.google.gwt.user.client.ui.ClickListener.html">ClickListener</a> listener</nobr>)</div>Adds a listener interface to receive click events.<h4 class="api">Parameters</h4>
<dl class="memberDetail">
<dt>listener</dt>
<dd>the listener interface to add</dd>
</dl>
<hr>
<a name="addFocusListener(com.google.gwt.user.client.ui.FocusListener)"></a>
<h3 class="api">addFocusListener</h3>
<div class="memberSig">public void<b> addFocusListener</b>(<nobr><a href="com.google.gwt.user.client.ui.FocusListener.html">FocusListener</a> listener</nobr>)</div>Adds a listener interface to receive mouse events.<h4 class="api">Parameters</h4>
<dl class="memberDetail">
<dt>listener</dt>
<dd>the listener interface to add</dd>
</dl>
<hr>
<a name="addKeyboardListener(com.google.gwt.user.client.ui.KeyboardListener)"></a>
<h3 class="api">addKeyboardListener</h3>
<div class="memberSig">public void<b> addKeyboardListener</b>(<nobr><a href="com.google.gwt.user.client.ui.KeyboardListener.html">KeyboardListener</a> listener</nobr>)</div>Adds a listener interface to receive keyboard events.<h4 class="api">Parameters</h4>
<dl class="memberDetail">
<dt>listener</dt>
<dd>the listener interface to add</dd>
</dl>
<hr>
<a name="getFocusImpl()"></a>
<h3 class="api">getFocusImpl</h3>
<div class="memberSig">protected static FocusImpl<b> getFocusImpl</b>()</div>Gets the FocusImpl instance.<h4 class="api">Return Value</h4>impl<hr>
<a name="getTabIndex()"></a>
<h3 class="api">getTabIndex</h3>
<div class="memberSig">public int<b> getTabIndex</b>()</div>Gets the widget's position in the tab index.<h4 class="api">Return Value</h4>the widget's tab index<hr>
<a name="isEnabled()"></a>
<h3 class="api">isEnabled</h3>
<div class="memberSig">public boolean<b> isEnabled</b>()</div>Gets whether this widget is enabled.<h4 class="api">Return Value</h4>
<code>true</code> if the widget is enabled<hr>
<a name="onBrowserEvent(com.google.gwt.user.client.Event)"></a>
<h3 class="api">onBrowserEvent</h3>
<div class="memberSig">public void<b> onBrowserEvent</b>(<nobr><a href="com.google.gwt.user.client.Event.html">Event</a> event</nobr>)</div>
<h4 class="api">Parameters</h4>
<dl class="memberDetail">
<dt>event</dt>
<dd>
<!--[Missing documentation]-->
</dd>
</dl>
<hr>
<a name="removeClickListener(com.google.gwt.user.client.ui.ClickListener)"></a>
<h3 class="api">removeClickListener</h3>
<div class="memberSig">public void<b> removeClickListener</b>(<nobr><a href="com.google.gwt.user.client.ui.ClickListener.html">ClickListener</a> listener</nobr>)</div>Removes a previously added listener interface.<h4 class="api">Parameters</h4>
<dl class="memberDetail">
<dt>listener</dt>
<dd>the listener interface to remove</dd>
</dl>
<hr>
<a name="removeFocusListener(com.google.gwt.user.client.ui.FocusListener)"></a>
<h3 class="api">removeFocusListener</h3>
<div class="memberSig">public void<b> removeFocusListener</b>(<nobr><a href="com.google.gwt.user.client.ui.FocusListener.html">FocusListener</a> listener</nobr>)</div>Removes a previously added listener interface.<h4 class="api">Parameters</h4>
<dl class="memberDetail">
<dt>listener</dt>
<dd>the listener interface to remove</dd>
</dl>
<hr>
<a name="removeKeyboardListener(com.google.gwt.user.client.ui.KeyboardListener)"></a>
<h3 class="api">removeKeyboardListener</h3>
<div class="memberSig">public void<b> removeKeyboardListener</b>(<nobr><a href="com.google.gwt.user.client.ui.KeyboardListener.html">KeyboardListener</a> listener</nobr>)</div>Removes a previously added listener interface.<h4 class="api">Parameters</h4>
<dl class="memberDetail">
<dt>listener</dt>
<dd>the listener interface to remove</dd>
</dl>
<hr>
<a name="setAccessKey(char)"></a>
<h3 class="api">setAccessKey</h3>
<div class="memberSig">public void<b> setAccessKey</b>(<nobr>char key</nobr>)</div>Sets the widget's 'access key'. This key is used (in conjunction with a
 browser-specific modifier key) to automatically focus the widget.<h4 class="api">Parameters</h4>
<dl class="memberDetail">
<dt>key</dt>
<dd>the widget's access key</dd>
</dl>
<hr>
<a name="setEnabled(boolean)"></a>
<h3 class="api">setEnabled</h3>
<div class="memberSig">public void<b> setEnabled</b>(<nobr>boolean enabled</nobr>)</div>Sets whether this widget is enabled.<h4 class="api">Parameters</h4>
<dl class="memberDetail">
<dt>enabled</dt>
<dd>
<code>true</code> to enable the widget, <code>false</code>
          to disable it</dd>
</dl>
<hr>
<a name="setFocus(boolean)"></a>
<h3 class="api">setFocus</h3>
<div class="memberSig">public void<b> setFocus</b>(<nobr>boolean focused</nobr>)</div>Explicitly focus/unfocus this widget. Only one widget can have focus at a
 time, and the widget that does will receive all keyboard events.<h4 class="api">Parameters</h4>
<dl class="memberDetail">
<dt>focused</dt>
<dd>whether this widget should take focus or release it</dd>
</dl>
<hr>
<a name="setTabIndex(int)"></a>
<h3 class="api">setTabIndex</h3>
<div class="memberSig">public void<b> setTabIndex</b>(<nobr>int index</nobr>)</div>Sets the widget's position in the tab index. If more than one widget has
 the same tab index, each such widget will receive focus in an arbitrary
 order. Setting the tab index to <code>-1</code> will cause this widget to
 be removed from the tab order.<h4 class="api">Parameters</h4>
<dl class="memberDetail">
<dt>index</dt>
<dd>the widget's tab index</dd>
</dl>
</div>
<div id="footer" xmlns="http://www.w3.org/1999/xhtml">
          &copy;2007 Google
          <span class="noprint">
            -
            <a href="http://www.google.com/">Google Home</a>
            -
            <a href="http://www.google.com/jobs/">We're Hiring</a>
            -
            <a href="http://www.google.com/privacy.html">Privacy Policy</a>
            -
            <a href="http://www.google.com/terms_of_service.html">Terms of Service</a>
            -
            <a href="mailto:code@google.com">Contact Us</a></span>
<div id="license" style="text-align: center; margin: 1em 0em 1em 0em">
            Except as otherwise
            <a href="http://code.google.com/policies.html#restrictions">noted</a>, the content of this  page is licensed under the  <a rel="license" href="http://creativecommons.org/licenses/by/2.5/">Creative Commons Attribution 2.5 License</a>.
              <!--
            <rdf:RDF xmlns="http://web.resource.org/cc/">
<Work rdf:about="">
<license rdf:resource="http://creativecommons.org/licenses/by/2.5/"></license>
</Work>
<License rdf:about="http://creativecommons.org/licenses/by/2.5/">
<permits rdf:resource="http://web.resource.org/cc/Reproduction"></permits>
<permits rdf:resource="http://web.resource.org/cc/Distribution"></permits>
<requires rdf:resource="http://web.resource.org/cc/Notice"></requires>
<requires rdf:resource="http://web.resource.org/cc/Attribution"></requires>
<permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"></permits>
</License>
</rdf:RDF>
              -->
            </div>
</div>
<script src="https://ssl.google-analytics.com/urchin.js" type="text/javascript" xmlns="http://www.w3.org/1999/xhtml"></script><script type="text/javascript">
          _uacct="UA-18071-1"; _uanchor=1; urchinTracker();
        </script>
</body>
</html>
